﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PServiceBus.Core.Interface;
using PServiceBus.Core.Runtime.Messages;

namespace PServiceBus.Transports.Handlers {
    public sealed class TcpTransportHandler : ITransportHandler<TcpTransport> {
        #region ITransportHandler<TcpTransport> Members

        public IMessageHandler<TMessage> CreateHandler<TMessage>(TcpTransport transport) where TMessage : class {
            return MessageHandlerBase<TMessage, string>.New<TcpTransport>(this, new Tcp.Provider<string>(), () => transport.Port.ToString());
        }

        public TimeSpan Interval { get; set; }

        public int BatchSize { get; set; }

        #endregion
    }
}
